<template>
<div class="a-wrapper">
    <div class="card" v-for="item in dataList" :key="item.id">
     <div class="card-left">
        <img :src="item.img">
     </div>
     <div class="card-right">
        <div class="card-right-text">
            <p class="text1">{{item.fruit}}</p>
            <p class="text2">月售{{item.nums}}件</p>
            <p class="text3">
                <span class="right-span1">￥{{item.price}}</span>
                <span class="right-span2">￥{{item.before}}</span>
            </p>
        </div>
        <div class="card-right-add">
           <img src="../assets/加.png">
        </div>
     </div>
   </div>
   
</div>  
   
</template>
<script>
export default {
    data(){
        return{
        dataList:[{
            id:1,
            fruit:'橙子250g/份',
            img:require("../assets/chengzi.png"),
            nums:10,
            price:'33.6',
            before:'44.4'
        },{
            id:2,
            fruit:'葡萄250g/份',
            img:require("../assets/putao.png"),
            nums:10,
            price:'33.6',
            before:'44.4'
        },{
            id:3,
            fruit:'薯条250g/份',
            img:require("../assets/food1.png"),
            nums:10,
            price:'33.6',
            before:'44.4'
        },{
            id:4,
            fruit:'鸡蛋250g/份',
            img:require("../assets/egg.png"),
            nums:10,
            price:'33.6',
            before:'44.4'
        }]
        }
  }
}
</script>

<style lang="css" scoped>
.a-wrapper{
    width: 100%;
    height: 100%;
}
.card{
    width: 70vw;
    height: 22vw;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ebe9e9;
    margin-top: 2vw;
}
.card-left{
    width: 18vw;
    height: 20vw;
}
.card-left img{
    width: 18vw;
    height: 20vw;
}
.card-right{
    width: 48vw;
    height: 20vw;
    display: flex;
    justify-content: space-between;
    
   
}
.card-right-text{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    line-height: 0vw;
}
.text1{
    margin-top: 2vw;
}
.text2{
    font-size: 2vw;
}
.text3{
    margin-bottom: 2vw;
}
.right-span1{
   color: red;
   font-size: 5vw;
}
.right-span2{
    text-decoration: line-through;
    font-size: 2vw;
    color: gray;
}
.card-right-add{
    width: 7vw;
    height: 7vw;
    margin-top: 12vw;
}
.card-right-add img{
    width: 7vw;
    height: 7vw;
}
</style>